package com.ruoyi.eduManage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.eduManage.domain.EduMotivation;
import com.ruoyi.eduManage.mapper.EduMotivationMapper;
import com.ruoyi.eduManage.service.IEduMotivationService;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;

@Service
public class EduMotivationServiceImpl implements IEduMotivationService {

    @Autowired
    private EduMotivationMapper eduMotivationMapper;

    @Override
    public EduMotivation selectEduMotivationByMotivationId(Long motivationId) {
        return eduMotivationMapper.selectEduMotivationByMotivationId(motivationId);
    }

    @Override
    public List<EduMotivation> selectEduMotivationList(EduMotivation eduMotivation) {
        return eduMotivationMapper.selectEduMotivationList(eduMotivation);
    }

    @Override
    public int insertEduMotivation(EduMotivation eduMotivation) {
        eduMotivation.setCreateTime(DateUtils.getNowDate());
        return eduMotivationMapper.insertEduMotivation(eduMotivation);
    }

    @Override
    public int updateEduMotivation(EduMotivation eduMotivation) {
        eduMotivation.setUpdateTime(DateUtils.getNowDate());
        return eduMotivationMapper.updateEduMotivation(eduMotivation);
    }

    @Override
    public int deleteEduMotivationByMotivationIds(String[] motivationIds) {
        return eduMotivationMapper.deleteEduMotivationByMotivationIds(motivationIds);
    }

    @Override
    public int deleteEduMotivationByMotivationId(Long motivationId) {
        return eduMotivationMapper.deleteEduMotivationByMotivationId(motivationId);
    }
}